﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteMaster.Master"
    Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="Microhard.Framework.MVCHelper" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    用户操作日志
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="section-header">
        <div class="title">
            <img src="<%=Url.Content("~/Content/images/ico-catalog.png")%>" alt="" />
            用户操作日志
        </div>
        <div class="options">
        </div>
    </div>
    <table width="100%">
        <tr>
            <td class="adminTitle">
                <img alt="用户姓名" src="<%=Url.Content("~/Content/images/ico-help.gif") %>" title="用户姓名" />
                <label for="userName" title="用户姓名">
                    用户姓名</label>:
            </td>
            <td class="adminData">
                <%=Html.TextBox("QueryUserRealName")%>
            </td>
        </tr>
    </table>
    <p>
    </p>
    <table class="adminContent">
        <tr>
            <td>
                <%Html.Telerik().Grid<Microhard.Permission.Models.UserOperationLogModel>((List<Microhard.Permission.Models.UserOperationLogModel>)this.Model.Data)
                    .Name("us-grid")
                         .ClientEvents(events => events.OnDataBinding("UserGridOnGridDataBinding"))
                         .ToolBar(t => t.Template(g =>
                    { 
                %>
                <%var searchParms = new Dictionary<string, string>();
                  searchParms.Add("UserRealName", "QueryUserRealName");
                %>
                <div class="header-menu">
                    <ul class="t-widget t-reset t-header t-menu">
                        <li class="t-item  t-state-default">
                            <%=Html.Authorized_SearchButton("btnSearch", "查询", "us-grid", searchParms, "UserGridOnGridDataBinding")%>
                        </li>
                    </ul>
                </div>
                <%}))
                         .Columns(columns =>
                    {
                        columns.Bound(x => x.UserName).Title("用户名");
                        columns.Bound(x => x.UserRealName).Title("姓名");
                        columns.Bound(x => x.ResourceName).Title("模块");
                        columns.Bound(x => x.OperationName).Title("操作");
                        columns.Bound(x => x.OperationTime).Title("操作时间");
                        columns.Bound(x => x.ResultStatus).Title("结果");
                        columns.Bound(x => x.ErrorMsg).Title("错误消息");
                        columns.Bound(x => x.MainDataID).Title("业务数据ID");
                        columns.Bound(x => x.Data).Title("数据");
                    })
                      .Pageable(settings => settings.Total(Model.Total).PageSize(Html.GetGridPageSize()).Position(GridPagerPosition.Top))
                      //绑定搜索按钮，执行对应的action
                    .DataBinding(dataBinding => dataBinding.Ajax().Select("_List", "UserOpreation"))
                    .EnableCustomBinding(true)
                    .Render();
                %>
            </td>
        </tr>
    </table>
</asp:Content>
